<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>自用技术博客-吴熵空间</title>
    <link rel="stylesheet" href="assets/css/style.css" />
    <link
      rel="stylesheet"
      href="assets/vendors/font-awesome/css/font-awesome.css"
    />
    <link rel="stylesheet" href="assets/vendors/nprogress/nprogress.css" />
  </head>


  <body>
    <header id="headerNavBar">
      <div id="containerBar">
        <a class="logoImg" href="index.html"><img src="./assets/img/logo.png" alt="" /></a>
        <div id="linkBox">
          <span><a href="https://eshin.co.jp/">Eshinホーム</a></span>
          <span><a href="https://esna-web.com/">ESNAホーム</a></span>
          <span><a href="http://47.101.64.135/">Vue-OnLine</a></span>
          <span
            ><input id="inputSearch" type="text" /><i class="searchNav fa fa-search"></i
          ></span>
        </div>
        <div id="loginLink"><a href="/admin">登录</a></div>
      </div>
    </header>
    <div class="wrapper">
      <div class="topnav">
        <ul class="navBox"></ul>
      </div>
      <div class="header">
        <h1 class="logo">
          <a href="index.html"><img src="assets/img/logo.png" alt="" /></a>
        </h1>
        
        <ul class="nav navBox" id="scrollBox"></ul>
      </div>
      <div class="aside">
        <div class="widgets">
          <h4>博文搜索</h4>
          <div class="body search">
            <form>
              <input
                type="text"
                class="keys"
                placeholder="输入关键字"
                id="searchcont2"
              />
              <input type="submit" class="btn" value="搜索" id="searchbtn2" />
            </form>
          </div>
        </div>
        <div class="widgets">
          <h4>外链地址</h4>
          <ul class="body random" id="randomBox"></ul>
        </div>
        <div class="widgets">
          <h4>最新评论，欢迎留言！</h4>
          <ul class="body discuz" id="commentsBox"></ul>
        </div>
      </div>
      <div class="content" id="swiperContainer">
         <div class="swipe">
          <ul
            class="swipe-wrapper"
            id="slidesBox"
            style="position: relative"
          ></ul>
          <p class="cursor">
            <span class="active"></span><span></span><span></span><span></span>
          </p>
          <a href="javascript:;" class="arrow prev"
            ><i class="fa fa-chevron-left"></i
          ></a>
          <a href="javascript:;" class="arrow next"
            ><i class="fa fa-chevron-right"></i
          ></a>
        </div>
      </div>
      <div class="content">
        <div class="panel hots">
          <h3>博文推荐</h3>
          <ul id="recommendBox"></ul>
        </div>
        <div class="panel new">
          <h3 style="margin-bottom: 30px">最新发布</h3>
          <div id="lastedBox"></div>
        </div>
      </div>
      <div class="footer">
        <p>© 本站由个人独立制作 主要用于技术学习笔记存储</p>
      </div>
    </div>
    <script src="assets/vendors/jquery/jquery.js"></script>
    <script src="assets/vendors/nprogress/nprogress.js"></script>
    <script src="assets/vendors/swipe/swipe.js"></script>
    <script src="./assets/vendors/art-template/template-web.js"></script>
    <script src="./assets/js/public.js"></script>
    <script></script>
    <script src="./assets/js/home.js"></script>
    <!-- 轮播图展示模板 -->
    <script type="text/html" id="slidesTpl">
      {{each data}}
      <li>
        <a
          href="{{ '/detail.html?id=' + $value.link !== '/detail.html?id=' ? '/detail.html?id=' + $value.link : ''}}"
        >
          <img src="{{$value.image}}" style="width: 1300px;height: 675px;" />
          <span>{{$value.title}}</span>
        </a>
      </li>
      {{/each}}
    </script>
    <!-- 引入热点展示模板 -->
    <script src="./assets/js/recommend.js"></script>

    <!-- 最新发布数据模板 -->
    <script type="text/html" id="lastedTpl">
      {{each data}}
      <div class="entry">
        <div class="head">
          <span class="sort">{{$value.category.title}}</span>
          <a href="detail.html?id={{$value._id}}">{{$value.title}}</a>
        </div>
        <div class="main" style="position:relative;">
          <div style="margin-top: 15px;">
            <p class="info">
              {{$value.author.nickName}} 发表于
              {{$imports.formateDate($value.createAt)}}
            </p>
            <p class="brief">{{$value.content.substr(0,80)}}...</p>
            <p class="extra">
              <i class="fa fa-book"></i><span class="reading">阅读({{$value.meta.views}})</span>
              <i class="fa fa-comments"></i><span class="comment">评论({{$value.meta.comments}})</span>
              <a href="detail.html?id={{$value._id}}" class="like">
                <i class="fa fa-thumbs-up"></i>
                <span>赞({{$value.meta.likes}})</span>
              </a>
              <a href="detail.html?id={{$value._id}}" class="tags">
                分类：<span>{{$value.category.title}}</span>
              </a>
            </p>
          </div>

          <a href="detail.html?id={{$value._id}}" class="thumb">
            <img
              src="{{$value.thumbnail}}"
              alt=""
              style="width: 230px;height: 130px;"
            />
          </a>
        </div>
      </div>
      {{/each}}
    </script>

    <script>
      // 前端搜索拦截
      

      var btn2 = document.getElementById("searchbtn2");
      var cont2 = document.getElementById("searchcont2");

      btn2.onclick = function (e) {
        if (cont2.value.trim() == "") {
          e.preventDefault();
          alert("请输入搜索内容");
          return;
        }
      };
    </script>
  </body>
</html>
